Skip to content

Make Config.Timeout functional and expose as --timeout flag#63

Merged
telegrapher merged 1 commit into
mainfrom
fix/make-timeout-config-functional
Feb 25, 2026
Merged

Make Config.Timeout functional and expose as --timeout flag#63
telegrapher merged 1 commit into
mainfrom
fix/make-timeout-config-functional

Conversation

@telegrapher

Copy link
Copy Markdown
Collaborator

Make the unused Timeout field functional

The Timeout field existed in the Config struct but was dead code — httpClient() hardcoded 30 * time.Second and no command exposed it as a flag.

Now:

  • httpClient() uses time.Duration(i.Timeout) * time.Second instead of the hardcoded value
  • A new --timeout persistent flag (default 30 seconds) is exposed on the root command
  • Also configurable via IMS_TIMEOUT env var or config file

The Timeout field existed in Config but was never used. httpClient()
hardcoded 30 * time.Second. Now httpClient() reads from i.Timeout,
and a new --timeout persistent flag (default 30s) is exposed on the
root command. Also configurable via IMS_TIMEOUT env var or config file.
@telegrapher
telegrapher merged commit f817ba7 into main Feb 25, 2026
5 checks passed
@telegrapher
telegrapher deleted the fix/make-timeout-config-functional branch February 28, 2026 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants